package cn.wolfcode.ssm.domain;

import cn.wolfcode.ssm.util.JSONUtil;
import lombok.Getter;
import lombok.Setter;

import java.util.HashMap;
import java.util.Map;

@Setter
@Getter
public class Employee {
    private Long id;

    private String name;

    private String password;

    private String email;

    private Integer age;

    private Boolean admin;

    private Long deptId;

    public String getJsonString(){
        Map<String,Object> map = new HashMap<>();
        map.put("id",id);
        map.put("name",name);
        map.put("password",password);
        map.put("email",email);
        map.put("age",age);
        map.put("admin",admin);
        map.put("deptId",deptId);
        return JSONUtil.toJSONString(map);
    }

}